$(function(){
	var username = JSON.parse(sessionStorage.getItem("username"))
	$.ajax({
		url:"http://localhost:8081/personnel/findByStudentId/"+username,
		type:"GET",
		async: false,
		headers:{
			"token":JSON.parse(sessionStorage.getItem("token"))
		},
		success:function(data){
			if(callBack(data)){
				if(data.code == 0){
					console.log(data.data);
					$("#admin").html(""+data.data.personnelName+data.data.competenceName+"");
				}else{
					window.location.href="/AMS/login.html"
				}
			}else{
				window.location.href="/AMS/error/403.html"
			}
		},
		error:function(){
			window.location.href="/AMS/login.html"
		}
	})
})
